Option Explicit
Dim objWMIService, objItem, colItems, strComputer, oFilesys, oFiletxt, o2Filetxt

Set oFilesys = CreateObject("Scripting.FileSystemObject")
Set oFiletxt = oFilesys.CreateTextFile("machineType.txt", True)
Set o2Filetxt = oFilesys.CreateTextFile("userName.txt", True)

' On Error Resume Next
strComputer = "."

' WMI connection to Root CIM
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")

' Classic For Next Loop
For Each objItem in colItems
   oFiletxt.WriteLine(objItem.Model)
Next
For Each objItem in colItems
    o2Filetxt.WriteLine(objItem.UserName)
Next

WSCript.Quit

oFiletxt.Close
